#ifndef TPL_TMP_H
#define TPL_TMP_H

#include <linux/spinlock.h>
#include <asm/semaphore.h>

/* typedef struct semaphore	mutex; */
#define mutex semaphore
#define atomic_long_t  atomic_t 
#define delayed_work work_struct

#define mutex_init(lock)		sema_init(lock, 1)
#define mutex_destroy(lock)			sema_init(lock, -99)
#define mutex_lock(lock)			down(lock)
#define mutex_trylock(lock)			(down_trylock(lock) ? 0 : 1)
#define mutex_unlock(lock)			up(lock)


struct cn_msg
{
    int len;
    void *data;
};
/*
struct cb_id
{
    
}
*/
#endif
